<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>报审</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" content="no-siteapp,no-transform,no-store, no-cache, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <link rel="shortcut icon" href="../../../favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../../../static/css/font.css">
    <link rel="stylesheet" href="../../../static/css/weadmin.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="../../../static/css/buildUnit/common.css">
    <style>
        body{
          min-height:800px;
          height:auto;
        }
        .attaIframe{
            height:700px;
        }
    </style>
</head>
<body>
<div class="content">
    <form class="layui-form" id="view" action="">
    </form>
    <script type="text/html" id="templateId">
        <div class="layui-collapse" lay-filter="auditItemCollapse">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">
                    审查项</h2>
                <div class="layui-colla-content layui-show">
                    {{# layui.each(d.auditItemList, function(index, item){ }}
                    <div class="layui-inline">
                        {{#if(item.auditItemChecked){}}
                        <input type="checkbox" name="auditItem" class="audit{{index}}" lay-filter="{{'auditItemCheckBox'+item.auditItemCode}}"
                               value="{{item.auditItemCode}}" title="{{item.auditItemName||''}}" checked/>
                        {{#}else{}}
                        <input type="checkbox" name="auditItem" class="audit{{index}}"  lay-filter="{{'auditItemCheckBox'+item.auditItemCode}}"
                               value="{{item.auditItemCode}}" title="{{item.auditItemName||''}}"/>
                        {{#}}}
                        {{#if(item.auditItemStatus && item.auditItemStatus!==''){}}
                        <span style="display: none">【{{item.auditItemStatus}}】</span>
                        {{#}else{}}
                        {{''}}
                        {{#}}}

                    </div>
                    {{# });}}
                </div>
            </div>
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">
                    报审材料</h2>
                <div class="layui-colla-content layui-show">
                    <div class="layui-tab" lay-filter="materialsTab">
                        <ul class="layui-tab-title">
                            {{# layui.each(d.auditItemList, function(index, item){ }}
                            {{#if(item.auditItemChecked){}}
                            {{#if(index===d.auditItemCheckIndex){}}
                            <li lay-id="{{'auditItemContent'+item.auditItemCode}}" class="layui-this">
                                {{item.auditItemName+'材料'||''}}
                            </li>
                            {{#}else{}}
                            <li lay-id="{{'auditItemContent'+item.auditItemCode}}">{{item.auditItemName+'材料'||''}}</li>
                            {{#}}}
                            {{#}}}
                            {{# });}}
                        </ul>
                        <div class="layui-tab-content" style="">
                            {{# layui.each(d.auditItemList, function(index, item){ }}
                            {{#if(item.auditItemChecked){}}
                            {{#if(index===d.auditItemCheckIndex){}}
                            <div class="layui-tab-item layui-show">
                                {{#}else{}}
                                <div class="layui-tab-item">
                                    {{#}}}
                                    <div class="chooseOrgan">
                                        审查机构:
                                        <div class="layui-input-inline">
                                            {{#if(item.auditItemOrganName&&item.auditItemOrganName!==''){}}
                                            <div class="detail">{{item.auditItemOrganName}}</div>
                                            {{#}else{}}
                                            <div class="detail">请选择</div>
                                            {{#}}}
                                            <input type="text" name="selectOrganId" value="{{item.auditItemOrganId}}"
                                                   autocomplete="off" style="display: none" class="layui-input"/>
                                            <input type="text" name="selectOrganName"
                                                   value="{{item.auditItemOrganName}}" autocomplete="off"
                                                   style="display: none" class="layui-input"/>
                                        </div>
                                        <button type="button" id="{{'organChoose'+item.auditItemCode}}"
                                                lay-filter="{{'organChoose'+item.auditItemCode}}"
                                                class="layui-btn layui-btn-primary">选择审查机构
                                        </button>
                                    </div>
                                    {{# if(item.auditItemMaterials && item.auditItemMaterials.length>0){}}
                                    <div class="layui-collapse"
                                         lay-filter="{{'materialsCollapse'+item.auditItemCode}}">
                                        {{# layui.each(item.auditItemMaterials,
                                        function(materialIndex,materialItem){ }}
                                        <div class="layui-colla-item">
                                            <h2 class="layui-colla-title">{{materialItem.materialType}}</h2>
                                            <div class="layui-colla-content layui-show">
                                                <table class="layui-table">
                                                    <colgroup>
                                                        <col>
                                                        <col>
                                                        <col>
                                                        <col>
                                                        <col>
                                                        <col>
                                                    </colgroup>
                                                    <thead>
                                                    <tr>
                                                        <th>
                                                            序号
                                                        </th>
                                                        <th colspan="4">
                                                            附件名称
                                                        </th>
                                                        <th>
                                                            操作
                                                        </th>
                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    {{# layui.each(materialItem.fileList,
                                                    function(fileIndex,fileItem){
                                                    }}
                                                    <tr>
                                                        <td>{{(fileIndex+1)}}</td>
                                                        <td colspan="4">{{fileItem.fileName}}</td>
                                                        <td>
                                                            <a class="layui-btn layui-btn-primary layui-btn-sm"
                                                               target="_blank" href="{{item.fileUrl}}">查看</a>
                                                        </td>
                                                    </tr>
                                                    {{# });}}
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                        {{# });}}
                                    </div>
                                    {{#}}}
                                </div>
                                {{#}}}
                                {{# });}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </script>
    <iframe src="" frameborder="0" class="attachmentList2 attaIframe" name="attachmentList2" style="display: none;"></iframe>
    <iframe src="" frameborder="0" class="attachmentList3 attaIframe" name="attachmentList3" style="display: none;"></iframe>
    <iframe src="" frameborder="0" class="attachmentList4 attaIframe" name="attachmentList4" style="display: none;"></iframe>
</div>
<div class="layui-row" style="display: none">
    <button lay-submit id="btnSubmit" class="layui-btn layui-btn-fluid" lay-filter="*">保存</button>
</div>
<script src="../../../static/js/main.js"></script>
<script type="text/javascript">
    layui.use(['jquery', 'permission', 'bluebird', 'reportMateriaEdit'], function () {
        var component = layui.reportMateriaEdit;
        component.init();
        component.eventBind();
        var $ = layui.jquery;
    });
</script>
</body>
</html>